package com.Entity;

import static javax.persistence.GenerationType.IDENTITY;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * TopicInfo entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "topicInfo", catalog = "smartsofa")
public class TopicInfo implements java.io.Serializable {

	// Fields

	private Integer topicId;
	private Integer userId;
	private String topic;
	private String topicContent;
	private String imgUrl;
	private Timestamp publicTime;
	private Integer commentNum;
	private Integer praiseNum;

	// Constructors

	/** default constructor */
	public TopicInfo() {
	}

	/** full constructor */
	public TopicInfo(Integer userId, String topic, String topicContent,
			String imgUrl, Timestamp publicTime, Integer commentNum,
			Integer praiseNum) {
		this.userId = userId;
		this.topic = topic;
		this.topicContent = topicContent;
		this.imgUrl = imgUrl;
		this.publicTime = publicTime;
		this.commentNum = commentNum;
		this.praiseNum = praiseNum;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "topicId", unique = true, nullable = false)
	public Integer getTopicId() {
		return this.topicId;
	}

	public void setTopicId(Integer topicId) {
		this.topicId = topicId;
	}

	@Column(name = "userId")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "topic", length = 200)
	public String getTopic() {
		return this.topic;
	}

	public void setTopic(String topic) {
		this.topic = topic;
	}

	@Column(name = "topicContent", length = 4000)
	public String getTopicContent() {
		return this.topicContent;
	}

	public void setTopicContent(String topicContent) {
		this.topicContent = topicContent;
	}

	@Column(name = "imgUrl", length = 200)
	public String getImgUrl() {
		return this.imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	@Column(name = "publicTime", length = 8)
	public Timestamp getPublicTime() {
		return this.publicTime;
	}

	public void setPublicTime(Timestamp publicTime) {
		this.publicTime = publicTime;
	}

	@Column(name = "commentNum")
	public Integer getCommentNum() {
		return this.commentNum;
	}

	public void setCommentNum(Integer commentNum) {
		this.commentNum = commentNum;
	}

	@Column(name = "praiseNum")
	public Integer getPraiseNum() {
		return this.praiseNum;
	}

	public void setPraiseNum(Integer praiseNum) {
		this.praiseNum = praiseNum;
	}

}